from tortoise import fields
from base.base_models import BaseModel


class User(BaseModel):
    username = fields.CharField(max_length=50, unique=True)
    hashed_password = fields.CharField(max_length=128)
    nickname = fields.CharField(max_length=50, null=True)

    def __str__(self):
        return self.username
